import { BrowserRouter,Route,Redirect } from 'react-router-dom'
import Index from './pages/Index/index'
import Login from './pages/Login/login'
import Mine from './pages/Mine/mine'
import Explore from './pages/explore/index'
import Message from './pages/Message/index'
import Form1 from './pages/Form/index'
import Like from './pages/like/index'
import Notice from './pages/notice/index'
function App() {
  return (
     <BrowserRouter>
        <div className='App'>
        {/* 默认路由匹配时，跳转到/index实现路由的重定向 */}
        
        {/* 关闭重定向  */}
          <Route path='/' render={()=> <Redirect to="/login" />} />
          {/*注册路由*/}
          <Route path="/explore" component={Explore}>
          </Route>
          <Route path="/index" component={Index}/>
          <Route path="/mine" component={Mine} />
          <Route path="/login" component={Login} />
          <Route path="/message" component={Message} />
          <Route path="/form" component={Form1} />
          <Route path="/like" component={Like} />
          <Route path="/notice" component={Notice} />
        </div>
     </BrowserRouter>
  );
}

export default App;
